]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix offset calculation for g_dpgettext
authorMatthias Clasen <mclasen@redhat.com>
Wed, 4 Mar 2015 11:03:10 +0000 (06:03 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 4 Mar 2015 13:37:52 +0000 (08:37 -0500)
We need to pass a positive number here.

https://bugzilla.gnome.org/show_bug.cgi?id=745521

src/shell-util.c

index f922f6eb50d5c2848f4601aad8007b4c8a35b045..d6815b9570b7c88a6e2f6524f51aabbc950cce16 100644 (file)
@@ -229,7 +229,7 @@ shell_util_translate_time_string (const char *str)
     setlocale (LC_MESSAGES, locale);
 
   sep = strchr (str, '\004');
-  res = g_dpgettext (NULL, str, sep ? str - sep : 0);
+  res = g_dpgettext (NULL, str, sep ? sep - str : 0);
 
   setlocale (LC_MESSAGES, "");